package com.zcoj.controller.User.rank;

import com.zcoj.core.model.ApiResponse;
import com.zcoj.service.RankService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenbin
 * @version 1.0
 * @description: TODO
 * @date 2023/5/12 14:56
 */
@Api(tags = "接口")
@RestController
@RequestMapping("/rank")
public class RankController {

    @Autowired
    private RankService rankService;

    @GetMapping("/getAllOiRank")
    public ApiResponse getAllOiRank(){
        return ApiResponse.success(rankService.getAllRank());
    }


    @GetMapping("/getRecentWeekRank")
    public ApiResponse getRecentWeekRank(){
        return ApiResponse.success(rankService.getRecentWeekRank());
    }
}
